#encoding:utf-8 

import os, sys 

from config.gl import DEBUG
from plugin.oss_ctrl import OssCtrl
# ==========================
# 目录下的文件批量上传到oss2
# ==========================

def batch_uposs(incbkt, path, tardir="", callback=None):	
	#forbiden file count 3000
	filelist = [] 
	for filename in os.listdir(path):
		fileobj = os.path.join(path, filename)
		if os.path.isfile(fileobj):
			filelist.append(fileobj)


	OssCtrl.upload_batch(incbkt, filelist, tardir, callback)

